<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=\, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        :root,body{
            height: 100%;
            background: linear-gradient(to top,#252525,#777777);
        }
        div{
            width: 500px;
            height: 500px;
            background: linear-gradient(white 50%,black 50%);
            margin: 10px auto;
            display: flex;
            align-items: center;/*Y轴方向居中*/
/*设置圆角*/border-radius: 50%;
/*设置动画*/transition: all 2s;
            /*rotate旋转 正值顺时针*/
            /* transform: rotate(40deg); */
        
        
            /*rotateX 沿X轴旋转 想象成3d*/
            /* transform: rotateZ(0deg); */
            /* rotateX   rotateY  rotateZ */
        
            /* transform-origin:设置旋转中心点 */
            /* transform-origin: left top; */
        }
        div:hover{
            transform: rotate(360deg);
        }

        div::before{
            content: "";
            display: block;  /*转换为块级元素*/
            width: 250px;
            height: 250px;
            background:radial-gradient(white 25%,black 26%);
            border-radius: 50%;
        }
        div::after{
            content: "";
            display: block; /*转换为块级元素*/
            width: 250px;
            height: 250px;
            background:radial-gradient(black 25%,white 26%);
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div></div>

</body>
</html>